﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ChinapnrAPI;

namespace Uranus.ChinaService.Receives
{
    public class BidOperationReceive : BaseReceive
    {
        public BidOperationReceive(HttpContext httpContext)
            : base(httpContext)
        {

        }
        #region 标的信息录入

        /// <summary>
        /// 添加标的信息录入回调
        /// </summary>
        public void AddBidInfo()
        {
            try
            {
                ChinapnrProduct chinapnrProduct = new ChinapnrProduct();
                //if (!chinapnrProduct.VerAddBidInfo(this.Request))
                //{
                //    WriteErrorLog("标的录入回调验证失败", string.Format("ProId:{0},RespCode:{1},RespDesc:{2}", this.ProId, this.RespCode, this.RespDesc));
                //}
                //else
                //{
                string result = string.Format("产品编号:{0}", this.ProId);
                WriteInfoLog("标的录入回调", result);

                if (Response.IsClientConnected) this.Response.Write("RECV_ORD_ID_" + this.ProId);
                //}
            }
            catch (Exception ex)
            {
                string error = string.Format("产品编号:{0},异常:{1}", this.ProId, ex.ToString());
                WriteErrorLog("标的录入回调执行异常", error, null, true);
            }
        }

        #endregion
    }
}